package com.zhongan.gateway.service;

import com.alibaba.fastjson.JSONObject;
import com.zhongan.gateway.common.exception.GatewayException;
import com.zhongan.gateway.dto.RequestBase;
import com.zhongan.gateway.dto.ResponseBase;

public interface SecurityService {

    /**
     * 解密及验签
     * 
     * @param bizContent
     * @param publicKey
     * @param type
     * @return
     */
    JSONObject checkSignAndDecrypt(RequestBase requestBase, String publicKey, String type) throws GatewayException;

    /**
     * 加密及签名
     * 
     * @param bizContent
     * @param publicKey
     * @param type
     * @return
     * @throws GatewayException
     */
    void encryptAndSign(ResponseBase responseBase, String publicKey, String type) throws GatewayException;

}
